package com.ha.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class HaRule {

    @Bean
    public IRule myRule(){
        return new HaRandomRule();//默认是轮询算法，现在变成了自定义算法
    }

}
